package gt

import (
	_ "github.com/go-sql-driver/mysql"
	"github.com/xormplus/xorm"
	"log"
)
/*

初始化xorm数据库引擎
*/

var DB *xorm.Engine

func initDB() {
	var err error
	DB, err = xorm.NewEngine(Config.DBEngine, Config.DBUrl)
	if err != nil {
		log.Fatal(err)
	}
	DB.ShowSQL(Config.DBShowLog)
}
